import Vue from 'vue'
import request from '@/itsoftUI/utils/request'
import qs from "qs"
const baseUrl = Vue.prototype.$itsoftUI.config.serviceUrl + '/supervise'
const superviseApi = {
    // 主贴列表
    getMainList: function (pageSize,pageIndex) {
        const data = {
            pageSize: pageSize,
            pageIndex: pageIndex
        };
        return request({
            url: baseUrl + '/supervisionPost/selectMyPublishPost',
            method: 'post',
            data: qs.stringify(data)
        })

    },
    // 子贴列表
    getGenList: function (pageSize,pageIndex) {
        const data = {
            pageSize: pageSize,
            pageIndex: pageIndex
        };
        return request({
            url: baseUrl + '/supervisionReply/selectMyPublishReply',
            method: 'post',
            data: qs.stringify(data)
        })
    },
    // 主贴详情
    getMainDetail: function(id) {
        const data = {
            id:id,
        };
        return request({
            url: baseUrl + '/supervisionPost/get',
            method: 'post',
            data: qs.stringify(data)
        })
    },
    // 跟帖详情列表：官方1,只看主贴的官方回复
    getGenDetailList: function(id) {
        const data = {
            id,
            type: 1
        };
        return request({
            url: baseUrl + '/supervisionReply/list',
            method: 'post',
            data: qs.stringify(data)
        })
    },
    // 详情页：跟帖列表，只有我的跟帖
    getGenDetailMineList: function(id) {
        const data = {
            id,
        };
        return request({
            url: baseUrl + '/supervisionReply/myReplyList',
            method: 'post',
            data: qs.stringify(data)
        })
    },
}
export {
    superviseApi
}